package com.vae.learn.feignclient;

import com.vae.base.model.video.RestResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
/**
 * 使用media模块提供的接口，也就是在learn模块远程调用media模块的接口
 */
@FeignClient(value = "media-api", fallbackFactory = MediaServiceClientFallbackFactory.class)
@RequestMapping("/media")
@Service
public interface MediaServiceClient {

 @GetMapping("/open/preview/{mediaId}")
 RestResponse<String> getPlayUrlByMediaId(@PathVariable("mediaId") String mediaId);

}